package com.briup.cms.web.controller;

import com.briup.cms.util.Result;
import com.briup.cms.util.ResultUtil;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.*;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author lining
 * @since 2024-09-10
 */
@RestController
@Api(tags = "资讯模块")
public class ArticleController {
    @GetMapping("/articles/{id}")
    @ApiOperation("根据文章编号查询文章相关信息")
    public Result selectArticleById(@PathVariable Integer id){
        return ResultUtil.success();
    }


    @ApiOperation("分页多条件查询文章信息")
    @PostMapping("/auth/article/query")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "pageNum",value = "当前页码",required = true),
            @ApiImplicitParam(name = "pageSize",value = "每页大小",required = true),
            @ApiImplicitParam(name = "categoryId",value = "栏目编号"),
            @ApiImplicitParam(name = "title",value = "文章标题"),
            @ApiImplicitParam(name = "status",value = "文章状态"),
            @ApiImplicitParam(name = "userId",value = "作者编号"),
            @ApiImplicitParam(name = "charged",value = "是否收费"),
            @ApiImplicitParam(name = "startTime",value = "开始时间"),
            @ApiImplicitParam(name = "endTime",value = "结束时间"),
    })
    public Result selectByQuery(Integer pageNum,Integer pageSize,Integer categoryId,
                                String title,String status,Integer userId,Integer charged,
                                String startTime,String endTime){
        return ResultUtil.success();
    }
}
